package com.zytlifeservice.domain.pay;

/**
 * Created by MJS on 2017/5/31.
 */
public class Bill {

    private String outTradeNo;

    private String type;

    private String totalAmount;

    private String date;

    private String status;

    public String getOutTradeNo() {
        return outTradeNo;
    }

    public void setOutTradeNo(String outTradeNo) {
        this.outTradeNo = outTradeNo;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getTotalAmount() {
        return totalAmount;
    }

    public void setTotalAmount(String totalAmount) {
        this.totalAmount = totalAmount;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }


    public static Bill getBill(BaseQmOrder baseOrder, String type) {
        Bill bill = new Bill();
        bill.setDate(baseOrder.getOrderTime());
        bill.setOutTradeNo(baseOrder.getOutTradeNo());
        bill.setStatus(baseOrder.getPayResult());  //这里由支付状态改成交易状态。
        bill.setTotalAmount(baseOrder.getSaleAmount());
        bill.setType(type);
        return bill;
    }
}
